﻿CREATE PROCEDURE [ArticleCategories_insert]
	@P_1 Int,
	@P_2 NVarChar(50),
	@P_3 NVarChar(max),
	@P_4 Int,
	@sync_row_count Int OUTPUT
AS
BEGIN
SET @sync_row_count = 0; IF NOT EXISTS (SELECT * FROM [ArticleCategories_tracking] WHERE [ArticleCategoryID] = @P_1) BEGIN SET IDENTITY_INSERT [ArticleCategories] ON; INSERT INTO [ArticleCategories]([ArticleCategoryID], [CategoryName], [CategoryDescription], [ParentCategoryID]) VALUES (@P_1, @P_2, @P_3, @P_4);  SET @sync_row_count = @@rowcount; SET IDENTITY_INSERT [ArticleCategories] OFF; END 
END